ulimit -n 65535

if ps aux | grep -w "./ShareMemory" | grep -v grep >/dev/null 2>&1;then
  echo "ShareMemory is running !!!!!!"
else
  ###### start ShareMemory ######
  cd /home/tlbb/Server/ 
  ./shm clear >/dev/null 2>&1
  rm -rf exit.cmd quitserver.cmd
  ./shm start >/dev/null 2>&1
  echo " start ShareMemory ......"
  sleep 5
  echo "ShareMemory start	启动成功 !!!!!!"

  ###### start World ######
  ./World >/dev/null 2>&1 &
  echo " start World ......"
  sleep 3
  echo "World start		启动成功 !!!!!!"

  ###### start Login ######
  ./Login >/dev/null 2>&1 &
  echo " start Login ......"
  sleep 1
  echo " Login start	启动成功 !!!!!!"

  ###### start Server ######
  #./ServerNew >/dev/null 2>&1 &
  ./ServerNew -loadscriptonce >/dev/null 2>&1 &
  echo " start ServerNew ......"
  sleep 40
  echo " ServerNew start		启动成功!!!!!!"  
  
  ###### 启动 billing ######
  cd /home/billing
  ./billing up -d >/dev/null 2>&1 &
  echo " 启动 billing ......"
  sleep 5
  echo " billing 启动成功 !!!!!!"
  
  
fi
  # ./Server -loadscriptonce>/dev/null 2>&1 &
  #./ServerNew -loadscriptonce >/dev/null 2>&1 &